package com.yuanthink.gwt.client.modules.user.member.presenters;

import com.extjs.gxt.ui.client.data.ModelData;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.MessageBox;
import com.extjs.gxt.ui.client.widget.grid.Grid;
import com.yuanthink.gwt.client.eventbus.EventBus;
import com.yuanthink.gwt.client.modules.user.member.views.MemberListView;
import com.yuanthink.gwt.client.presenter.IPresenter;
/**
 * 
 * @author 06peng
 *
 */
public class MemberListPresenter implements IPresenter {
	
	String columnId;
	
	public interface Display {
		Grid<ModelData> getGrid();
	}
	
	LayoutContainer container;
    MemberListView display;
    EventBus eventBus;
    
    public MemberListPresenter(EventBus eventBus) {
        this.eventBus = eventBus;
    }
    
    public void go(LayoutContainer container) {
        try {
            if (display == null) {
                display = new MemberListView();
                bind();
            }
            this.container = container;
            container.add(display);
            container.layout();
        } catch (Exception e) {
            MessageBox.alert("系统消息", "系统繁忙请稍候再试" + e.toString(), null);
        }
    }
    
    public void bind() {
    	
    }
    

	@Override
	public void setColumnId(String columnId) {
		this.columnId = columnId;
	}

}
